alter user 'root'@'localhost' identified with mysql_native_password by '{{mysql['passwd']}}';
create user if not exists 'root'@'%';
alter user 'root'@'%' identified with mysql_native_password by '{{mysql['passwd']}}';
grant all on *.* to 'root'@'%' with grant option;

{% if linkis_spark.get('enable',False) == True %}
create user '{{db['dbuser']}}'@'{{linkis_spark['host']}}' identified by '{{db['dbpasswd']}}';
grant all on '{{fate_flow['dbname']}}'.* to '{{db['dbuser']}}'@'{{linkis_spark['host']}}';
{% endif %}

flush privileges;
